import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import permission from './modules/permission'
import user from './modules/user'
import multiTab from './modules/multiTab'
// 防刷新插件
// import PersistedState from 'vuex-persistedstate'

Vue.use(Vuex)
export default new Vuex.Store({

    modules: {
        permission, // 动态路由菜单
        user, // 用户信息
        multiTab // 选项卡
    },

    state: {
    },

    mutations: {

    },

    getters,

    actions: {

    },

    // 注入插件
    plugins: [
        // 注入防刷新插件
        // PersistedState({ storage: window.sessionStorage })
    ]
})